<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<style>
<!--
.paratitle {
	font-weight: bold;
}

.apptitle {
	color: green;
}
-->
</style>
<!--代码工程运行向导-->
<div class="easyui-layout" data-options="fit:true">
	<div class="TableTitle" data-options="region:'north',border:false">
		<c:if test="${pageset.pageType==1}">新增${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==2}">修改${JSP_Messager_Title}记录</c:if>
		<c:if test="${pageset.pageType==0}">浏览${JSP_Messager_Title}记录</c:if>
	</div>
	<div data-options="region:'center'">
		<div class="demo-info" style="margin: 8px;">
			<div class="demo-tip icon-future-projects"></div>
			<div>
				项目信息
				<p>
					<span class="paratitle"> project.name: </span>
					<span> ${jsonResult.project.name}</span>
				</p>
				<p>
					<span class="paratitle"> project.pcontent: </span>
					<span> ${jsonResult.project.pcontent}</span>
				</p>
			</div>
		</div>
		<div class="demo-info" style="margin: 8px;">
			<div class="demo-tip icon-future-projects"></div>
			<div>
				工程信息
				<p>
					<span class="apptitle"> 数据库表名</span>
					<span class="paratitle"> guide.tablename: </span>
					<span> ${jsonResult.guide.tablename}</span>
				</p>
				<p>
					<span class="apptitle"> 业务标志CODE</span>
					<span class="paratitle"> guide.appcode: </span>
					<span> ${jsonResult.guide.appcode}</span>
				</p>
				<p>
					<span class="apptitle"> 业务名称</span>
					<span class="paratitle"> guide.appname: </span>
					<span> ${jsonResult.guide.appname}</span>
				</p>
				<p>
					<span class="apptitle"> 机构类型</span>
					<span class="paratitle"> guide.comtype: </span>
					<span> ${jsonResult.guide.comtype}</span>
				</p>
				<p>
					<span class="apptitle"> 机构CODE</span>
					<span class="paratitle"> guide.comcode: </span>
					<span> ${jsonResult.guide.comcode}</span>
				</p>
				<p>
					<span class="apptitle"> 项目CODE</span>
					<span class="paratitle"> guide.procode: </span>
					<span> ${jsonResult.guide.procode}</span>
				</p>
			</div>
		</div>
		<div class="demo-info" style="margin: 8px;">
			<div class="demo-tip icon-future-projects"></div>
			<div>
				文件信息
				<div>
					<c:forEach items="${jsonResult.packs}" var="node">


						<div class="demo-info"
							style="margin: 8px; background-color: white;">
							<div>
								<span class="apptitle">${node.packname}包code</span>
								<span class="paratitle"> ${node.packcodetitle}: </span>
								<span> ${node.packcode}</span>
							</div>
							<div>
								<span class="apptitle">${node.packname}包目录</span>
								<span class="paratitle"> ${node.packpathtitle}: </span>
								<span> ${node.packpath}</span>
							</div>
							<div>
								<span class="apptitle">包内模板信息</span>
								<span class="paratitle"> files: </span>
								<div class="demo-info" style="margin: 8px;">
									<c:forEach items="${node.files}" var="file">
										<div>
											<span class="apptitle">${file.temname}</span>
											<span class="paratitle">${file.pcontent}:</span>
											<span> ${file.filename}</span>
										</div>
									</c:forEach>
								</div>
							</div>
						</div>
					</c:forEach>
				</div>
			</div>
		</div>
		<div class="demo-info" style="margin: 8px;">
			<div class="demo-tip icon-future-projects"></div>
			<div>
				字段信息
				<br />
				<br />
				<p>
					<span class="apptitle"> 数据库字段序列</span>
					<span class="paratitle"> fields: </span>
				</p>
				<table class="easyui-datagrid" data-options="fitColumns:true">
					<thead>
						<tr>
							<th data-options="field:'字段名称',width:100">
								<span class="apptitle">字段名称</span>
							</th>
							<th data-options="field:'字段代码',width:100">
								<span class="apptitle">字段代码</span>
							</th>
							<th data-options="field:'字段类型',width:100">
								<span class="apptitle">字段类型</span>
							</th>
							<th data-options="field:'字段长度',width:100">
								<span class="apptitle">字段长度</span>
							</th>
							<th data-options="field:'表单类型',width:100">
								<span class="apptitle">表单类型</span>
							</th>
							<th data-options="field:'是否主键',width:100">
								<span class="apptitle">是否主键</span>
							</th>
							<th data-options="field:'是否必填',width:100">
								<span class="apptitle">是否必填</span>
							</th>
							<th data-options="field:'查询类型',width:100">
								<span class="apptitle">查询类型</span>
							</th>
						</tr>
						<tr>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fname</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fcode</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fdatatype</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">flength</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fformtype</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fpk</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">fmandatory</span>
							</th>
							<th>
								<span style="color: #8F5700; font-weight: bold;">flimittype</span>
							</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${jsonResult.fields}" var="node">
							<tr>
								<td>
									${node.fname}
								</td>
								<td>
									${node.fcode}
								</td>
								<td>
									${node.fdatatype}
								</td>
								<td>
									${node.flength}
								</td>
								<td>
									${node.fformtype}
								</td>
								<td>
									${node.fpk}
								</td>
								<td>
									${node.fmandatory}
								</td>
								<td>
									${node.flimittype}
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
		<div class="demo-info" style="margin: 8px;">
			<div class="demo-tip icon-future-projects"></div>
			<div>
				freemark工具说明
			</div>
			<div>
				$&nbsp{" green mouse"?cap_first}
				<br />
				substring 取子串
				<br />
				cap_first 首字母大写
				<br />
				uncap_first 首字母小写
				<br />
				capitalize 首字母大写
				<br />
				html HTML格式的转义文本
				<br />
				index_of 索引所在位置
				<br />
				j_string Java语言规则的字符串转义
				<br />
				js_string JavaScript语言规则的字符串转义
				<br />
				json_string JSON规则的字符串转义
				<br />
				last_index_of 最后的索引所在位置
				<br />
				length 字符串长度
				<br />
				lower_case 小写形式
				<br />
				replace 替换
				<br />
				url URL转义
				<br />
				trim 修整字符串
				<br />
				upper_case 大写形式
				<br />
				处理空 $&nbsp{mouse!"No mouse."} <#assign mouse="Jerry" $&nbsp{mouse!"No mouse."}
			</div>
		</div>
	</div>
	<div data-options="region:'south',border:false">
		<form id="dom_formfarmRunTemps">
			<div class="div_button" style="text-align: center; padding: 4px;">
				<input type="text" style="width: 360px;" class="easyui-validatebox"
					data-options="required:true" name="workpath"
					value="${jsonResult.project.dirpath}">
				<input type="hidden" name="ids" value="${ids}">
				<a id="dom_genarat_formfarmcodeguide" href="javascript:void(0)"
					iconCls="icon-ok" class="easyui-linkbutton" style="color: #000000;">生成代码</a>
				<a id="dom_cancle_formfarmcodeguide" href="javascript:void(0)"
					iconCls="icon-cancel" class="easyui-linkbutton"
					style="color: #000000;">取消</a>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
	var submitFormruntemplate;
	$(function() {
		submitFormruntemplate = $('#dom_formfarmRunTemps').SubmitForm( {
			pageType : "1",
			grid : null,
			currentWindowId : null
		});

		//关闭窗口
		$('#dom_cancle_formfarmcodeguide').bind('click', function() {
			$('#winfarmcodepackage').window('close');
		});
		//生成代码
		$('#dom_genarat_formfarmcodeguide')
				.bind(
						'click',
						function() {
							submitFormruntemplate
									.postSubmit("admin/FarmCodeGuideaddRunTemplate.do");
						});
	});
	//-->
</script>